SQLite
SQLite class provides mechanisms to interact with a SQLite database on the JVM platform. It implements Driver, Driver.Pool, and Driver.Transactional interfaces, offering functionalities such as connection pooling, executing queries, fetching data, and handling transactions.
The URL uses the same sqlx-style format as the native target, so one string works everywhere:
sqlite::memory:- Creates an in-memory databasesqlite:database.db/sqlite://database.db- Creates/opens a database file (relative path)sqlite:///path/to/database.db- Uses an absolute pathsqlite:///path/to/database.db?mode=rwc- Query parameters as defined by SQLite URI filenames (mode=ro|rw|rwc|memory,cache=shared|private,immutable,vfs)
Any other parameter is rejected, as on the other targets. A jdbc:sqlite: prefix is accepted as well and skips that check, so JDBC-style URLs with driver-specific parameters (e.g. xerial pragmas such as ?journal_mode=WAL) keep working. See SQLiteUrl and toJdbcUrl for the translation.
Parameters
The URL of the SQLite database to connect to.
Optional pool configuration, defaulting to ConnectionPool.Options.
Optional registry of value encoders to use for encoding query parameters.